/*
 * Copyright (c) 2019-2020, https://api.iot.10086.cn/(https://gitee.com/cmcc-iot-api/iot-card-open-application/).
 */
package cn.iot.card.open.terminal.dto;

import cn.iot.card.open.constants.Constants;

/**
 * 物联卡终端控制下行模板短信
 */
public class DownTemplateSmsDTO extends DownEmptySmsDTO {

    /**
     * 动作码，动作码对应相应的短信模板
     */
    private String actionid;

    /**
     * 变量参数，单个变量值的长度不超过10位字符，多个参数用下划线分隔
     */
    private String params;

    /**
     * 编码形式，传入1表示ASCII码形式，用户终端将按照text模式解析；不传参数，短信将采用USC2编码形式，用户终端按照PDU模式解析
     */
    private String encode;

    public String getActionid() {
        return actionid;
    }

    public void setActionid(String actionid) {
        this.actionid = actionid;
    }

    public String getParams() {
        return params;
    }

    public void setParams(String params) {
        this.params = params;
    }

    public String getEncode() {
        return encode;
    }

    public void setEncode(String encode) {
        this.encode = encode;
    }

    @Override
    public String toString() {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append("发送控制短信的物联卡号码:").append(this.getMsisdns()).append(",");
        stringBuilder.append("动作码:").append(actionid).append(",");
        stringBuilder.append("变量参数:").append(params).append(",");
        if (Constants.ENCODE_VALUE.equals(encode)) {
            stringBuilder.append("编码形式:").append("ASCII码");
        } else {
            stringBuilder.append("编码形式:").append("USC2编码");
        }

        return stringBuilder.toString();
    }
}
